#!/usr/bin/perl -w
use File::Spec;

my $root=shift;
$root=File::Spec->rel2abs($root);

rm_svn_info($root);

sub rm_svn_info{
    my $rt=shift;
    opendir DIR, $rt;
    print "$rt\n";
    my @cnt=readdir DIR;
    closedir DIR;
        print "In $rt\n";
    foreach my $s (@cnt){
        if(($s eq ".svn")){
            print "rm $rt/$s\n";
            `rm -rf $rt/$s`;
        }
        if($s eq "." || $s eq ".."){
            next;
        }
        if(-d "$rt/$s"){
            rm_svn_info("$rt/$s");
        }
    }
}
